<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$Think.lang.collection_data_import}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {include file="public/file_css"}
    <style>
        h4{ font-size:18px;font-family:"Microsoft YaHei","Simsun",Arial; font-weight:normal; line-height:1; padding:0; margin:0;}
        .icons li{  margin:5px 0; text-align:center; height:120px; cursor:pointer;}
        .icons li i{ display:block; font-size:35px; margin:10px 0; line-height:60px; height:60px;}
        .icons li:hover{ background:#2f4056; border-radius:5px; color:#fff;}
        .icons li:hover i{ font-size:50px;}
        .section{ padding:20px;}
        .section h4 span{ color:#0084e9;}
        .fa {font-size: 25px !important;}
        .fa:hover {font-size: 50px !important;}
    </style>
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">

        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>{$Think.lang.collection_data_import}</legend>
        </fieldset>
        <div class="section" id="chart">
            <form class="layui-form" id="DataForm" lay-filter="DataForm" method="post" onsubmit="return false">
                <div class="layui-form layuimini-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label required">{$Think.lang.category}</label>
                        <div class="layui-input-inline">
                            <select name="cid" id="cid" lay-verify="required" lay-reqtext="{$Think.lang.selectCategory}" layui.formselect>
                                <option value="">{$Think.lang.DownSelect}</option>
                                {volist name="tree" id="item"}
                                <option value="{$item.id}" >{$item.p|raw}{$item.name}</option>
                                {/volist}
                            </select>
                        </div>
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="importData">{$Think.lang.collection_start_import}</button>
                        <input type="hidden" id="coid" value="{$id}">
                        <a class="layui-btn" href="{:url('content')}?id={$id}">{$Think.lang.collection_return_content}</a>
                    </div>
                </div>
            </form>
            <hr>
            <iframe width="100%" id="reload" style="border:none;" src=""></iframe>
        </div>
    </div>
</div>
{include file="public/file_js"}
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.jquery;
        var form = layui.form;
        form.on('submit(importData)',function(obj){
            let cid = $("#cid").val();
            let id = $("#coid").val();
            layer.confirm('{$Think.lang.collection_confirm}',function (index) {
                $("#reload").attr('src','{:url("Allimport")}?id='+id+'&cid='+cid);
                //关闭等待弹出层
                layer.closeAll();
            })
        });
    });
</script>
</body>
</html>